import request from '@/utils/request';
import IS_MOCK, { BASE_URL } from '@/utils/url';

//获取设备列表
export async function getWarningChart() {
  return IS_MOCK
    ? request(`/api/warningData/getWarningChart`, {
      method: 'post',
    })
    : request(`${BASE_URL}/alarmlevel/getProgramme`, {
      method: 'post',
    });
}
//获取微量元素
export async function getMicorElements(params) {
  return IS_MOCK
    ? request(`/api/warningData/getWarningChart`, {
      method: 'post',
    })
    : request(`${BASE_URL}/alarmlevel/getWaterquality`, {
      method: 'post',
      data: { id: params },
    });
}
export async function getWaterQualityData() {
  return IS_MOCK
    ? request(`/api/warningData/getWarningChart`, {
      method: 'post',
    })
    : request(`${BASE_URL}/alarmlevel/getWaterqualityPie`, {
      method: 'post',
    });
}
export async function geAlltWaterQualityData(params) {
  return IS_MOCK
    ? request(`/api/warningData/getWarningChart`, {
      method: 'post',
    })
    : request(`${BASE_URL}/alarmlevel/getWaterqualityChart`, {
      method: 'post',
      data: { id: params },
    });
}
